// 轮播图
var swiper = new Swiper('.swiper-container', {
	spaceBetween: 30,
	centeredSlides: true,
	autoplay: {
		delay: 2500,
		disableOnInteraction: false,
	},
	pagination: {
		el: '.swiper-pagination',
		clickable: true,
	},
	navigation: {
		nextEl: '.swiper-button-next',
		prevEl: '.swiper-button-prev',
	},
});

// 地址定位
var cityselect = document.getElementById('cityselect');
var city = document.getElementById('city');
var cityvar = city.getElementsByTagName('var')[0];
var select = document.getElementById('select');
var selectdiv = select.getElementsByTagName('div');
var selectspan = select.getElementsByTagName('span')[0];
cityselect.onclick = function (e) {
	var e = e || window.event;
	var target = e.target || e.srcElement;
	if (target.id = 'city') {
		alert(123);
		city.className = 'now';
		select.style.display = 'block';
	};
	if (target.parentNode.className == 'select-div' && target.nodeName == 'SPAN') {
		alert(234);
		console.log(e);
		console.log(target.parentNode.className);
		cityvar.innerHTML = target.innerHTML;
		select.style.display = 'none';
	};
}